home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Graphics / Sphere / Sphere.app / HelpPanel.nib (.txt) next >
NeXT TypedStream Data  |  1991-07-13  |  5KB  |  126 lines

  1. typedstream
  2. StreamTable
  3.     HashTable
  4. Object
  5. [20c]
  6. typedstream
  7. [1026c]
  8. typedstream
  9.     HashTable
  10. Object
  11. FirstResponder
  12. HeaderClass
  13. %%%%i@@
  14. firstnib
  15. checkSpelling:
  16. alignSelCenter:
  17.     unscript:
  18. pasteFont:
  19. runPageLayout:
  20. superscript:
  21. copyRuler:
  22.     copyFont:
  23. selectAll:
  24. pasteRuler:
  25. toggleRuler:
  26. showGuessPanel:
  27. alignSelLeft:
  28. paste:
  29. performClose:
  30. arrangeInFront:
  31. subscript:
  32. copy:
  33. alignSelRight:
  34. delete:
  35. orderFrontColorPanel:
  36. underline:
  37. performMiniaturize:
  38. SphereControl
  39. genericobject_nib
  40.     infoPanel
  41. phiTextDisplayPtr
  42. latTextDisplayPtr
  43. radiusTextDisplayPtr
  44. hideBoxPtr
  45. longTextDisplayPtr
  46.     helpPanel
  47. sphereViewPtr
  48. sphereDrawerPtr
  49. autoRenderPtr
  50. thetaTextDisplayPtr
  51. shadeBoxPtr
  52. getThetaSlider:
  53. getRadiusSlider:
  54. getPhiSlider:
  55. messageSphereDrawer:
  56. clickHideBox:
  57. clickShadeBox:
  58. getLongSlider:
  59. getLatSlider:
  60. autoRender:
  61. loadHelpNib:
  62. loadInfoNib:
  63. [3713c]
  64. typedstream
  65.     HashTable
  66. Object
  67. NibData
  68. @@@@s
  69. Storage
  70. {*@@}
  71. [6{*@@}]
  72. File's Owner
  73. CustomObject
  74. SphereControl
  75. Panel
  76. WindowTemplate
  77. iiii***@s@
  78. Sphere Help 
  79.     Responder
  80. ScrollView
  81. ClipView
  82. ciifffcfffs
  83. [2400c]{\rtf0\ansi{\fonttbl\f1\fnil Times-Roman;\f0\fswiss Helvetica;}
  84. \margl40
  85. \margr40
  86. \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\f1\b0\i0\ul0\fs28 \
  87. \i\fs48 Overview
  88. \b0\i0\fs28 \
  89. I wrote this program as learning example on how to convert a straight-line Unix-C program into a finished NextStep/Objective-C Application.  The actual conversion effort turned out to be much easier than I anticipated. \
  90. I had already written a command line program that calculated a sphere and output it as PostScript-code to stdout (sphere [parameter list] > output.ps).  I was able to convert this program into a Next App in about 4 hours.  \
  91. \i\fs48 IB & Objective-C\
  92. \i0\fs28 \
  93. The first step was to create the main window in Interface Builder -- using sliders and buttons in place of the Unix command-line parameters.\
  94. Next, I subclassed object to create a SphereDrawerObject which contains all of the drawing & shading routines from my original Unix-C code (some functions still need to be turned into methods, but the code works as is). \
  95. I then created a sub-class of view called SphereView and overrode the initFrame: and drawSelf:: methods.  The drawSelf:: method messages the SphereDrawerObject which outputs postscript code into the view.  Because this happens INSIDE drawSelf:: rather than locking-focus & drawing INTO the instance of SphereView, it makes the print-routine trivial to implement (click&drag from the print menu-button to the view and connect the printPSCode: target method).\
  96. Last (but far from least) I subclassed object to create my controller (SphereControl).  All of the program variables are stored in this object and methods to read and write each instance variable are implemented.  Also, all of the program controls are routed through this object.  \
  97. \i\fs48 The Sphere Program
  98. \i0\fs28 \
  99. The light source is fixed in the Z-direction and the program uses lambert's law of cosines to calculate the shading.\
  100. Moving the sliders for theta and phi actually move the eyepoint around the sphere, rather than rotating the sphere (only apparent if shading is turned on).\
  101. Be sure to try low settings on the latitude and longitude sliders (interesting non-spherical shapes are generated by the sphere algorithm).    \
  102. \fs36 Special thanks to Tyler Gingrich for helping teach me many of the basics about programming on the NeXT.
  103. NXCursor
  104. NXImage
  105. NXibeam
  106. Scroller
  107. Control
  108. _doScroller:
  109. @@@ffs
  110. Button
  111. ButtonCell
  112. ActionCell
  113.     Helvetica
  114. SSphere
  115.     TextField
  116. TextFieldCell
  117. Sphere
  118. Times-Italic$
  119. &A Conversion Example: C to Objective-C
  120. ScrollingText
  121. Field2
  122. Field4
  123. {i*@@@}
  124. [1{i*@@@}]
  125.     helpPanel
  126.